<!DOCTYPE html>
<html lang="en">
<head>
    <title>新增设备</title>
    <link href="../bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
    <link href="../js/My97DatePicker/skin/WdatePicker.css">
    <script src="http://cdn.bootcss.com/jquery/2.1.1/jquery.min.js"></script>
    <script src="../bootstrap/dist/js/bootstrap.min.js"></script>
    <script src="../js/My97DatePicker/WdatePicker.js"></script>
</head>
<head>

    <meta charset="UTF-8">
    <title>新增设备信息</title>
    <style>
        #main-nav {
            margin-left: 1px;
        }

        #main-nav.nav-tabs.nav-stacked > li > a {
            padding: 10px 8px;
            font-size: 12px;
            font-weight: 600;
            color: #4A515B;
            background: #E9E9E9;
            background: -moz-linear-gradient(top, #FAFAFA 0%, #E9E9E9 100%);
            background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#FAFAFA), color-stop(100%,#E9E9E9));
            background: -webkit-linear-gradient(top, #FAFAFA 0%,#E9E9E9 100%);
            background: -o-linear-gradient(top, #FAFAFA 0%,#E9E9E9 100%);
            background: -ms-linear-gradient(top, #FAFAFA 0%,#E9E9E9 100%);
            background: linear-gradient(top, #FAFAFA 0%,#E9E9E9 100%);
            filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FAFAFA', endColorstr='#E9E9E9');
            -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr='#FAFAFA', endColorstr='#E9E9E9')";
            border: 1px solid #D5D5D5;
            border-radius: 4px;
        }

        #main-nav.nav-tabs.nav-stacked > li > a > span {
            color: #4A515B;
        }

        #main-nav.nav-tabs.nav-stacked > li.active > a, #main-nav.nav-tabs.nav-stacked > li > a:hover {
            color: #FFF;
            background: #3C4049;
            background: -moz-linear-gradient(top, #4A515B 0%, #3C4049 100%);
            background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#4A515B), color-stop(100%,#3C4049));
            background: -webkit-linear-gradient(top, #4A515B 0%,#3C4049 100%);
            background: -o-linear-gradient(top, #4A515B 0%,#3C4049 100%);
            background: -ms-linear-gradient(top, #4A515B 0%,#3C4049 100%);
            background: linear-gradient(top, #4A515B 0%,#3C4049 100%);
            filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#4A515B', endColorstr='#3C4049');
            -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr='#4A515B', endColorstr='#3C4049')";
            border-color: #2B2E33;
        }

        #main-nav.nav-tabs.nav-stacked > li.active > a, #main-nav.nav-tabs.nav-stacked > li > a:hover > span {
            color: #FFF;
        }

        #main-nav.nav-tabs.nav-stacked > li {
            margin-bottom: 4px;
        }

        /*定义二级菜单样式*/
        .secondmenu a {
            font-size: 10px;
            color: #4A515B;
            text-align: center;
        }

        .navbar-static-top {
            background-color: #212121;
            margin-bottom: 5px;
        }

        .navbar-brand {
            background: url('') no-repeat 10px 8px;
            display: inline-block;
            vertical-align: middle;
            padding-left: 50px;
            color: #fff;
        }
    </style>

</head>
<body>
<div class="navbar navbar-duomi navbar-static-top" role="navigation">
    <div class="container-fluid">
        <div class="navbar-header">
            <a class="navbar-brand" href="" id="logo">设备明细
            </a>
        </div>
    </div>
</div>
<div class="container" style="display: block; width: 576px; left: 352px; top: 124px; z-index: 9005;">
    <form role="form" name="deviceinfo" method="post" action="/device/updateDevice" onsubmit="return checkDevice();" >
        <input type="hidden" value="${device.id}" name="deviceId"/>
        <div class="form-group">
            <label for="deviceName">设备名称:</label>
            <input type="text" class="form-control" id="deviceName" name="deviceName"
                   value=${device.device_name}>
        </div>
        <div class="form-group">
            <label for="device_number">设备编号:</label>
            <input type="text" class="form-control" id="device_number" name="device_number"
                   value="${device.device_number}">
        </div>
        <div class="form-group">
        <label for="device_number">设备系统:</label>
        <input type="text" class="form-control" id="device_os" name="device_os"
               value="${device.os}">
        </div>
        <div class="form-group">
            <label for="deviceName">系统版本:</label>
            <input type="text" class="form-control" id="os_version" name="os_version"
                   value="${device.os_version}">
        </div>
        <div class="form-group">
            <label for="resolution">分辨率:</label>
            <input type="text" class="form-control" id="resolution" name="resolution"
                   value="${device.resolution}">
        </div>
        <div class="form-group">
            <label for="cpu">CPU个数:</label>
            <input type="text" class="form-control" id="cpu" name="cpu"
                   value="${device.cpu}">
        </div>
        <div class="form-group">
            <label for="frequency">CPU主频(单位HZ):</label>
            <input type="text" class="form-control" id="frequency" name="frequency"
                   value="${device.frequency}">
        </div>
        <div class="form-group">
            <label for="memory_ysize">内存大小(单位G):</label>
            <input type="text" class="form-control" id="memory_ysize" name="memory_ysize"
                   value="${device.memory_ysize}">
        </div>
        <div class="form-group">
            <label >分组:</label>
            <input type="text" class="form-control" id="group_info" name="group_info"
                   value="${device.group_info}">
            <div class="form-group">
                <label for="owner">负责人:</label>
                <input type="text" class="form-control" id="owner" name="owner"
                       value="${device.owner}">
            </div>
            <!--<div class="form-group">-->
                <!--<label for="borrower">借用人:</label>-->
                <!--<input type="text" class="form-control" id="borrower" name="borrower"-->
                       <!--value="${device.borrower}">-->
            <!--</div>-->
            <label for="startTime">购买日期:</label>
            <input class="form-control" name="startTime" id="startTime" value="2016-04-21 23:14:01" onclick="WdatePicker({readOnly:true,dateFmt:'yyyy-MM-dd HH:mm:ss'})" readonly="">
            <!--<label for="backTime">归还日期:</label>-->
                <!--<input class="form-control" name="backTime" id="backTime" value="2016-04-21 23:14:01" onclick="WdatePicker({readOnly:true,dateFmt:'yyyy-MM-dd HH:mm:ss'})" readonly="">-->
                <div class="text-right">
                <button type="button" class="btn btn-warning" onclick ="location.href='searchDevice'">返回</button>
            </div>
        </div>
    </form>
</div>
</div>
</body>

<script>
    function checkDevice(){
        var devicename = document.getElementById("deviceName").value;
        var device_number = document.getElementById("device_number").value;
        if(devicename == ""  ){
            alert("设备名称不能为空");
            return false;
        }
        if(device_number == ""  ){
            alert("设备资产码不能");
            return false;
        }else{
            return true;
        }
    }
</script>
</html>